package com.cci.kangdao.task;

import com.cci.kangdao.dao.ServiceAgrementDao;
import com.cci.kangdao.dao.UserTDao;
import com.cci.kangdao.service.PropertiesUtils;
import com.cci.kangdao.utilTool.CollectionUtils;
import com.cci.kangdao.utilTool.Date_Util;
import com.cci.kangdao.utilTool.LocalTimeUtil;
import com.cci.kangdao.utilTool.MailUtil;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Component
public class ServiceAgreementTask {
    private Logger log = Logger.getLogger(this.getClass().getName());

    @Autowired
	private ServiceAgrementDao saDao;

    //因为服务器时间比现实时间早八小时，所以这里设置每天0点定时推送(相当于现实时间的八点推送)
    public void dealFeedBack(){
        log.info("更新协议状态：当前时间为:"+ LocalTimeUtil.getRealCurrentTime());
        try {
            saDao.updateServiceAgreementStatus(Date_Util.getOnlyDate());
        } catch (Exception e) {
            log.error("定时任务振亮的dealFeedBack发生异常，异常信息" + e.getMessage(), e);
        }
        log.info("更新协议状态定时任务完毕!");
    }




}
